package com.nb.verticaldraglistview;

import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import android.os.Bundle;

import java.util.Arrays;
import java.util.List;

public class MainActivity extends AppCompatActivity {

    private RecyclerView mRecyclerView;
    private List<String> mData = Arrays.asList(
            "1aa", "bb", "cc", "dd",
            "2aa", "bb", "cc", "dd",
            "3aa", "bb", "cc", "dd",
            "4aa", "bb", "cc", "dd",
            "5aa", "bb", "cc", "dd"
    );

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        mRecyclerView = findViewById(R.id.rv);

        LinearLayoutManager layoutManager = new LinearLayoutManager(this);
        mRecyclerView.setLayoutManager(layoutManager);
        MyAdapter myAdapter = new MyAdapter(mData);
        mRecyclerView.setAdapter(myAdapter);


    }
}